<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>PreparedStatement.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css" media="screen">
    body {background-color:white;}
    body,div,p,dl,.memname, .params, .exception {font: normal normal normal 16px/22px "HelveticaNeue", Helvetica, "Arial Narrow", Arial, sans-serif;}
    #nav-path {display:none;}
    h2:first-of-type {margin-top:2px; border:none;}
    h2.groupheader {font-size:26px; line-height:28px;color:#286796;}
    div.groupheader { font-weight:600; font-size:18px;color: rgb(51, 51, 51);}
    h3 {font-size:20px;color: rgb(51, 51, 51);}
    div.header { background-image:none; background-color: #3b96d7; color:white;}
    div.title {text-align:center;font-size: 28px; font-weight:100;}
    .summary {display:none;}
    dl.section {border:none;}
    .memproto > *, .memitem > * {
            box-shadow: none!important;
            -moz-box-shadow: none!important;
            -webkit-box-shadow: none!important;
            background-image:none!important;
    }
    .memproto {
            border-bottom: 1px #b8c8e9 solid;
            background-color: #f7fcff;
    }
    .textinfo {color: #428bca;}
    .textnote {color: #a94442;}
</style>
</head><body>
<!-- Generated by Doxygen 1.8.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bb61871b4c63e4e6685a8d6c52430594.html">zdb</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">PreparedStatement.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A <b>PreparedStatement</b> represent a single SQL statement pre-compiled into byte code for later execution. </p>
<p>The SQL statement may contain <em>in</em> parameters of the form "?". Such parameters represent unspecified literal values (or "wildcards") to be filled in later by the various setter methods defined in this interface. Each <em>in</em> parameter has an associated index number which is its sequence in the statement. The first <em>in</em> '?' parameter has index 1, the next has index 2 and so on. A PreparedStatement is created by calling <a class="el" href="Connection_8h.html#a16dfbbe273d9a872462bed182dec3bb5" title="Creates a PreparedStatement object for sending parameterized SQL statements to the database...">Connection_prepareStatement()</a>.</p>
<p>Consider this statement: </p>
<pre>
 INSERT INTO employee(name, picture) VALUES(?, ?)
</pre><p> There are two <em>in</em> parameters in this statement, the parameter for setting the name has index 1 and the one for the picture has index 2. To set the values for the <em>in</em> parameters we use a setter method. Assuming name has a string value we use <a class="el" href="PreparedStatement_8h.html#a618654d179459a9394828a4117f97d05" title="Sets the in parameter at index parameterIndex to the given string value. ">PreparedStatement_setString()</a>. To set the value of the picture we submit a binary value using the method <a class="el" href="PreparedStatement_8h.html#ac19d3cb5e6ee2222c1320f9aee7547ff" title="Sets the in parameter at index parameterIndex to the given blob value. ">PreparedStatement_setBlob()</a>.</p>
<p>Note that string and blob parameter values are set by reference and <b>must</b> not "disappear" before either <a class="el" href="PreparedStatement_8h.html#a6f0eb01daec7f61bf92707b7de0a246f" title="Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL st...">PreparedStatement_execute()</a> or <a class="el" href="PreparedStatement_8h.html#a3e33ed8289ac8b8b11438b009a169e63" title="Executes the prepared SQL statement, which returns a single ResultSet object. ">PreparedStatement_executeQuery()</a> is called.</p>
<h3>Example:</h3>
<p>To summarize, here is the code in context. </p>
<pre>
PreparedStatement_T p = Connection_prepareStatement(con, "INSERT INTO employee(name, picture) VALUES(?, ?)");
PreparedStatement_setString(p, 1, "Kamiya Kaoru");
PreparedStatement_setBlob(p, 2, jpeg, jpeg_size);
PreparedStatement_execute(p);
</pre> <h3>Reuse:</h3>
<p>A PreparedStatement can be reused. That is, the method <a class="el" href="PreparedStatement_8h.html#a6f0eb01daec7f61bf92707b7de0a246f" title="Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL st...">PreparedStatement_execute()</a> can be called one or more times to execute the same statement. Clients can also set new <em>in</em> parameter values and re-execute the statement as shown in this example: </p>
<pre>
PreparedStatement_T p = Connection_prepareStatement(con, "INSERT INTO employee(name, picture) VALUES(?, ?)");
for (int i = 0; employees[i].name; i++) 
{
       PreparedStatement_setString(p, 1, employees[i].name);
       PreparedStatement_setBlob(p, 2, employees[i].picture, employees[i].picture_size);
       PreparedStatement_execute(p);
}
</pre> <h3>Result Sets:</h3>
<p>Here is another example where we use a Prepared Statement to execute a query which returns a Result Set:</p>
<pre>
PreparedStatement_T p = Connection_prepareStatement(con, "SELECT id FROM employee WHERE name LIKE ?"); 
PreparedStatement_setString(p, 1, "%Kaoru%");
ResultSet_T r = PreparedStatement_executeQuery(p);
while (ResultSet_next(r))
       printf("employee.id = %d\n", ResultSet_getInt(r, 1));
</pre><p>A ResultSet returned from <a class="el" href="PreparedStatement_8h.html#a3e33ed8289ac8b8b11438b009a169e63" title="Executes the prepared SQL statement, which returns a single ResultSet object. ">PreparedStatement_executeQuery()</a> "lives" until the Prepared Statement is executed again or until the Connection is returned to the Connection Pool.</p>
<h3>Date and Time</h3>
<p>PreparedStatement provides <a class="el" href="PreparedStatement_8h.html#a3cf4d848d41a7901727bccac2b58d31c" title="Sets the in parameter at index parameterIndex to the given Unix timestamp value. ">PreparedStatement_setTimestamp()</a> for setting a Unix timestamp value. To set SQL Date, Time or DateTime values, simply use <a class="el" href="PreparedStatement_8h.html#a618654d179459a9394828a4117f97d05" title="Sets the in parameter at index parameterIndex to the given string value. ">PreparedStatement_setString()</a> with a time string format understood by your database. For instance to set a SQL Date value, </p>
<pre>
  PreparedStatement_setString(p, "2013-12-28");
</pre><p><em>A PreparedStatement is reentrant, but not thread-safe and should only be used by one thread (at the time).</em></p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="Connection_8h.html" title="A Connection represent a connection to a SQL database system. ">Connection.h</a> <a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set. ">ResultSet.h</a> <a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0acb682b8260ab1c60b918599864e2e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#a0acb682b8260ab1c60b918599864e2e5">T</a>&#160;&#160;&#160;PreparedStatement_T</td></tr>
<tr class="separator:a0acb682b8260ab1c60b918599864e2e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a9e5cf7eed5e2233d2e8e90a70d1e0f77"><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/>
PreparedStatement_S *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#a9e5cf7eed5e2233d2e8e90a70d1e0f77">T</a></td></tr>
<tr class="separator:a9e5cf7eed5e2233d2e8e90a70d1e0f77"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6f0eb01daec7f61bf92707b7de0a246f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#a6f0eb01daec7f61bf92707b7de0a246f">PreparedStatement_execute</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P)</td></tr>
<tr class="memdesc:a6f0eb01daec7f61bf92707b7de0a246f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.  <a href="#a6f0eb01daec7f61bf92707b7de0a246f">More...</a><br/></td></tr>
<tr class="separator:a6f0eb01daec7f61bf92707b7de0a246f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e33ed8289ac8b8b11438b009a169e63"><td class="memItemLeft" align="right" valign="top">ResultSet_T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#a3e33ed8289ac8b8b11438b009a169e63">PreparedStatement_executeQuery</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P)</td></tr>
<tr class="memdesc:a3e33ed8289ac8b8b11438b009a169e63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the prepared SQL statement, which returns a single ResultSet object.  <a href="#a3e33ed8289ac8b8b11438b009a169e63">More...</a><br/></td></tr>
<tr class="separator:a3e33ed8289ac8b8b11438b009a169e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaaec0e14c95b70b342dff0cf604cadd"><td class="memItemLeft" align="right" valign="top">long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#aaaaec0e14c95b70b342dff0cf604cadd">PreparedStatement_rowsChanged</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P)</td></tr>
<tr class="memdesc:aaaaec0e14c95b70b342dff0cf604cadd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of rows that was inserted, deleted or modified by the most recently completed SQL statement on the database connection.  <a href="#aaaaec0e14c95b70b342dff0cf604cadd">More...</a><br/></td></tr>
<tr class="separator:aaaaec0e14c95b70b342dff0cf604cadd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Parameters</div></td></tr>
<tr class="memitem:a618654d179459a9394828a4117f97d05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#a618654d179459a9394828a4117f97d05">PreparedStatement_setString</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, const char *x)</td></tr>
<tr class="memdesc:a618654d179459a9394828a4117f97d05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given string value.  <a href="#a618654d179459a9394828a4117f97d05">More...</a><br/></td></tr>
<tr class="separator:a618654d179459a9394828a4117f97d05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a350056fea6744da297b674bfbe1ee94e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#a350056fea6744da297b674bfbe1ee94e">PreparedStatement_setInt</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, int x)</td></tr>
<tr class="memdesc:a350056fea6744da297b674bfbe1ee94e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given int value.  <a href="#a350056fea6744da297b674bfbe1ee94e">More...</a><br/></td></tr>
<tr class="separator:a350056fea6744da297b674bfbe1ee94e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8e3eafb030f466356edc9bdffae841a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#ac8e3eafb030f466356edc9bdffae841a">PreparedStatement_setLLong</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, long long x)</td></tr>
<tr class="memdesc:ac8e3eafb030f466356edc9bdffae841a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given long long value.  <a href="#ac8e3eafb030f466356edc9bdffae841a">More...</a><br/></td></tr>
<tr class="separator:ac8e3eafb030f466356edc9bdffae841a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a023adeb93e4ff455d57a9a5be8d1e26f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#a023adeb93e4ff455d57a9a5be8d1e26f">PreparedStatement_setDouble</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, double x)</td></tr>
<tr class="memdesc:a023adeb93e4ff455d57a9a5be8d1e26f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given double value.  <a href="#a023adeb93e4ff455d57a9a5be8d1e26f">More...</a><br/></td></tr>
<tr class="separator:a023adeb93e4ff455d57a9a5be8d1e26f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac19d3cb5e6ee2222c1320f9aee7547ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#ac19d3cb5e6ee2222c1320f9aee7547ff">PreparedStatement_setBlob</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, const void *x, int size)</td></tr>
<tr class="memdesc:ac19d3cb5e6ee2222c1320f9aee7547ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given blob value.  <a href="#ac19d3cb5e6ee2222c1320f9aee7547ff">More...</a><br/></td></tr>
<tr class="separator:ac19d3cb5e6ee2222c1320f9aee7547ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cf4d848d41a7901727bccac2b58d31c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#a3cf4d848d41a7901727bccac2b58d31c">PreparedStatement_setTimestamp</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P, int parameterIndex, time_t x)</td></tr>
<tr class="memdesc:a3cf4d848d41a7901727bccac2b58d31c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given Unix timestamp value.  <a href="#a3cf4d848d41a7901727bccac2b58d31c">More...</a><br/></td></tr>
<tr class="separator:a3cf4d848d41a7901727bccac2b58d31c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Properties</div></td></tr>
<tr class="memitem:ace45c650c6146570da0067a7329edc09"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#ace45c650c6146570da0067a7329edc09">PreparedStatement_getParameterCount</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> P)</td></tr>
<tr class="memdesc:ace45c650c6146570da0067a7329edc09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of parameters in this prepared statement.  <a href="#ace45c650c6146570da0067a7329edc09">More...</a><br/></td></tr>
<tr class="separator:ace45c650c6146570da0067a7329edc09"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a0acb682b8260ab1c60b918599864e2e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;&#160;&#160;PreparedStatement_T</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a9e5cf7eed5e2233d2e8e90a70d1e0f77"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct PreparedStatement_S* <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a618654d179459a9394828a4117f97d05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given string value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The string value to set. Must be a NUL terminated string. NULL is allowed to indicate a SQL NULL value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a350056fea6744da297b674bfbe1ee94e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setInt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given int value. </p>
<p>In general, on both 32 and 64 bits architecture, <code>int</code> is 4 bytes or 32 bits and <code>long long</code> is 8 bytes or 64 bits. A <code>long</code> type is usually equal to <code>int</code> on 32 bits architecture and equal to <code>long long</code> on 64 bits architecture. However, the width of integer types are architecture and compiler dependent. The above is usually true, but not necessarily. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The int value to set </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac8e3eafb030f466356edc9bdffae841a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setLLong </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long long&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given long long value. </p>
<p>In general, on both 32 and 64 bits architecture, <code>int</code> is 4 bytes or 32 bits and <code>long long</code> is 8 bytes or 64 bits. A <code>long</code> type is usually equal to <code>int</code> on 32 bits architecture and equal to <code>long long</code> on 64 bits architecture. However, the width of integer types are architecture and compiler dependent. The above is usually true, but not necessarily. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The long long value to set </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a023adeb93e4ff455d57a9a5be8d1e26f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setDouble </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given double value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The double value to set </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac19d3cb5e6ee2222c1320f9aee7547ff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setBlob </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given blob value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The blob value to set </td></tr>
    <tr><td class="paramname">size</td><td>The number of bytes in the blob </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a3cf4d848d41a7901727bccac2b58d31c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setTimestamp </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given Unix timestamp value. </p>
<p>The timestamp value given in <code>x</code> is expected to be in the UTC timezone. For instance, a value returned by time(3) which represents the system's notion of the current Greenwich time. <em class="textinfo">SQLite</em> does not have temporal SQL data types per se. Using this method with SQLite will store the timestamp value as a numerical type as-is. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
    <tr><td class="paramname">parameterIndex</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td class="paramname">x</td><td>The GMT timestamp value to set. E.g. a value returned by time(3) </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database access error occurs or if parameter index is out of range </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> <a class="el" href="ResultSet_8h.html#a073df52b04dfbaaaf088baede0f770f5" title="Retrieves the value of the designated column in the current row of this ResultSet object as a Unix ti...">ResultSet_getTimestamp</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a6f0eb01daec7f61bf92707b7de0a246f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_execute </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a3e33ed8289ac8b8b11438b009a169e63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ResultSet_T PreparedStatement_executeQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the prepared SQL statement, which returns a single ResultSet object. </p>
<p>A ResultSet "lives" only until the next call to a PreparedStatement method or until the Connection is returned to the Connection Pool. <em>This means that Result Sets cannot be saved between queries</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A ResultSet object that contains the data produced by the prepared statement. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set. ">ResultSet.h</a> </dd>
<dd>
<a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aaaaec0e14c95b70b342dff0cf604cadd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long long PreparedStatement_rowsChanged </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of rows that was inserted, deleted or modified by the most recently completed SQL statement on the database connection. </p>
<p>If used with a transaction, this method should be called <em>before</em> commit is executed, otherwise 0 is returned. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of rows changed by the last (DIM) SQL statement </dd></dl>

</div>
</div>
<a class="anchor" id="ace45c650c6146570da0067a7329edc09"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PreparedStatement_getParameterCount </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of parameters in this prepared statement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>A PreparedStatement object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of parameters in this prepared statement </dd></dl>

</div>
</div>
</div><!-- contents -->
<p style="text-align:center;color:#808080;font-size:90%;margin:40px 0 20px 0;">
Copyright &copy; <a href="http://tildeslash.com/">Tildeslash Ltd</a>. All
rights reserved.</p>
</body></html>
